<template>
  <div>
    <el-select v-model="selectMould" placeholder="请选择">
      <el-option
        v-for="item in mouldList"
        :key="item"
        :label="item"
        :value="item">
      </el-option>
    </el-select>
    <i-frame :src="url"/>
  </div>
</template>
<script>
import iFrame from "@/components/iFrame/index";

export default {
  name: "Swagger",
  components: {iFrame},
  watch: {
    selectMould(v) {
      this.url = process.env.VUE_APP_BASE_API + v + "/swagger-ui/index.html"
    }
  },
  data() {

    return {
      selectMould: "",
      mouldList: ['admin', 'generator'],
      url: process.env.VUE_APP_BASE_API + "admin/swagger-ui/index.html"
    };
  },
};
</script>
